#ifndef TESTER_EXCEPTIONS_H_
#define TESTER_EXCEPTIONS_H_

#include <exception>

namespace Tester {

   class CriticalError : public std::exception {
      private:
         const CriticalError& operator=(const CriticalError& toCopy);

         const char *_name;
         const char *_what;

      public:

         explicit CriticalError(const char *name, const char *what=0):
            _name(name),
            _what(what) {}

         inline const char *name() const throw() { return _name; }
         virtual const char *what() const throw() { return _what; }

         virtual ~CriticalError() throw() {}
   };

   class AssertFail : public std::exception {
      private:
         const AssertFail& operator=(const AssertFail& toCopy);

         const char *assertType;
         const int _line;

      public:
         explicit AssertFail(const char *assertType, int line = -1) :
            assertType(assertType),
            _line(line) {}

         inline const char *type() const throw() { return assertType; }
         inline int line() const throw() { return _line; }

         virtual ~AssertFail() throw() {}
   };
}
#endif
